<?php

/**
 * DeudorDomicilio form.
 *
 * @package    form
 * @subpackage deudor_domicilio
 * @version    SVN: $Id: sfPropelFormTemplate.php 6174 2007-11-27 06:22:40Z fabien $
 */
class DeudorDomicilioForm extends BaseDeudorDomicilioForm
{
  public function configure()
  {
  	$this->setWidgets(array(
      'id'        => new sfWidgetFormInputHidden(),
      'deudor_id' => new sfWidgetFormInputHidden(),
      'calle'     => new sfWidgetFormInput(),
      'numero'    => new sfWidgetFormInput(),
      'depto'     => new sfWidgetFormInput(),
      'villa'     => new sfWidgetFormInput(),
      'comuna'    => new sfWidgetFormInput(),
      'cuidad'    => new sfWidgetFormInput(),
      'region'    => new sfWidgetFormInput(),
      'telefono'  => new sfWidgetFormInput(),));
  
      $this->setValidators(array(
      'id'        => new sfValidatorPropelChoice(array('model' => 'DeudorDomicilio', 'column' => 'id', 'required' => false)),
      'deudor_id' => new sfValidatorPropelChoice(array('model' => 'Deudor', 'column' => 'id')),
      'calle'     => new sfValidatorString(array('max_length' => 50)),
      'numero'    => new sfValidatorInteger(),
      'depto'     => new sfValidatorString(array('max_length' => 10, 'required' => false)),
      'villa'     => new sfValidatorString(array('max_length' => 25, 'required' => false)),
      'comuna'    => new sfValidatorString(array('max_length' => 25)),
      'cuidad'    => new sfValidatorString(array('max_length' => 25)),
      'region'    => new sfValidatorString(array('max_length' => 25)),
      'telefono'  => new sfValidatorString(array('max_length' => 25)),
    ));

    $this->widgetSchema->setNameFormat('deudor_domicilio[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
  
  }
}